<template>
  <view class="disFlx">
    <view class="flex-shrink-0 mr-8">
      <TImage
        src="https://hb-saas.obs.cn-south-1.myhuaweicloud.com/mall/saas/problem-icon.png"
        width="40rpx"
        height="40rpx"
      />
    </view>
    <view class="flex-1">
      <!-- <view class="color1 fz-14 mb-8"><text>张三</text></view> -->
      <view class="fz-16 default-color font-bold mb-8" style="word-break: break-all">
        <text>{{ data?.content }}</text>
      </view>
      <view class="color1 fz-14 mb-16">
        <text>{{ dateUtil().to(data?.createTime) }}</text>
      </view>
      <!-- 回答 -->
      <Answering
        v-if="data?.replyContent"
        :reply-content="data?.replyContent"
        :reply-time="data?.replyTime"
      />
    </view>
  </view>
</template>

<script setup lang="ts">
  import TImage from '@/components/TImage/index.vue';
  import Answering from './Answering.vue';
  import { dateUtil } from '@/utils/dateUtil';
  import type { PropType } from 'vue';
  import type { IAnsweringQuestionsResult } from '@/api/businessOpportunities/type';

  defineProps({
    data: Object as PropType<IAnsweringQuestionsResult>,
  });
</script>

<style lang="scss" scoped>
  .color1 {
    color: #969799;
  }
</style>
